package com.shop.cereshop.app.dao.tim.redpacket;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.cereshop.app.tencent.im.model.redpacket.ReceiveRedPacketDTO;
import com.shop.cereshop.app.tencent.im.model.redpacket.RedPacket;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @description: 红包
 * @author zdd
 * @date 2025/9/3 14:30
 * @version 1.0
 */
@Mapper
public interface RedPacketMapper extends BaseMapper<RedPacket> {

    /**
     * 修改红包状态、剩余数量、剩余金额
     * @param receiveDTO 红包领取对象
     */
    int updateStatus(ReceiveRedPacketDTO receiveDTO);

    /**
     * 获取过期未领取的红包列表
     * @return 过期红包列表
     */
    List<RedPacket> getExpiredRedPackets();

}
